/*jslint maxerr: 50, indent: 4, browser: true */
/*global define */

(function (undef) {
    "use strict";

    define("object", ["mergeModules", "init", "object.getPrototypeOf"], function (make) {
        var buri = make.mergeModules(arguments),
            config = {
                "compatability": {}
            };

        function instanceOf(obj, constructor) {
            while (obj !== undef && obj !== null) {
                if (obj === constructor.prototype) {
                    return true;
                }

                obj = buri.object.getPrototypeOf(obj);
            }

            return false;
        }

        instanceOf.init = function (options) {
            buri.init(config, options);
            buri.object.getPrototypeOf(config);
        };

        return {
            "object": {
                "instanceOf": instanceOf
            }
        };
    });
}());
